home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-02-17 | 1.6 KB | 52 lines | [TEXT/ToyS] |
- (*
-
- Sample script to show the DocBreaker's scripting features
- Before using this sample script, you need:
-
- - AppleScript software installed
- - XTND software installed
- - the DocBreaker application installed
- - the "Examples" folder from the DocBreaker package in the same folder as DocBreaker
-
- This example shows a Microsoft RTF -> Claris MacWrite Pro translation.
- If the required translators are not available, you will have to change the script.
-
- *)
-
- tell application "DocBreaker 1.0"
- activate
- try
- with timeout of 600 seconds
-
- -- assign the general preferences
-
- set preference max files to 5
-
- set preference font rule to is_equal_to
- set preference font to "Courier"
-
- set preference size rule to is_greater_than
- set preference size to 14
-
- set preference style rule to is_equal_to
- set preference style to plain -- this is needed to override existing preferences
- set preference style to underline
- set preference style to bold
-
- set preference justification rule to differs_from
- set preference justification to center
-
- set preference color rule to is_equal_to
- set preference color to red
-
- -- break the file "FileToBreak.rtf" and produces a file series called "Part.xxx"
- -- asking to the MacWrite Pro 1.x translator to build MacWrite Pro files
-
- break the file ":Examples:FileToBreak.rtf" into file ":Examples:Part" using translator "MacWrite Pro 1.x" with format "MWPd"
- end timeout
- on error errText number errNum
- beep
- display dialog "An error occurred! " & errText & " Error code: " & errNum buttons {"Alas"} default button "Alas" with icon 0
- end try
- quit
- end tell